ggplot(ces_data, aes(x = date, y = revision)) +
geom_line(color = "steelblue", alpha = 0.6, linewidth = 0.8) +
geom_hline(yintercept = 0, linetype = "dashed", color = "red", linewidth = 1) +
geom_smooth(method = "loess", se = TRUE, color = "darkblue",
fill = "lightblue", alpha = 0.3) +
annotate("rect", xmin = as.Date("2008-01-01"), xmax = as.Date("2009-12-31"),
ymin = -Inf, ymax = Inf, alpha = 0.2, fill = "orange") +
annotate("text", x = as.Date("2008-07-01"), y = max(ces_data$revision, na.rm = TRUE) * 0.9,
label = "Great Recession", size = 3.5, fontface = "italic") +
annotate("rect", xmin = as.Date("2020-03-01"), xmax = as.Date("2020-06-01"),
ymin = -Inf, ymax = Inf, alpha = 0.2, fill = "red") +
annotate("text", x = as.Date("2020-04-15"), y = max(ces_data$revision, na.rm = TRUE) * 0.8,
label = "COVID-19", size = 3.5, fontface = "italic", color = "darkred") +
scale_y_continuous(labels = comma) +
labs(
title = "BLS Employment Revisions Over Time",
subtitle = "Positive values = BLS initially underestimated job growth",
x = "Date",
y = "Revision (thousands of jobs)",
caption = "Source: Bureau of Labor Statistics CES Program"
) +
theme_minimal(base_size = 12) +
theme(
plot.title = element_text(face = "bold", size = 14, hjust = 0.5),
plot.subtitle = element_text(size = 11, hjust = 0.5),
plot.caption = element_text(size = 8, color = "grey50")
)